<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      layout:decorate="main">
<head>
    <meta charset="UTF-8">
    <title>执行开发计划</title>
    <link th:href="@{/localcss/appinfolist.css}" href="../static/localcss/appinfolist.css" rel="stylesheet">
    <script th:src="@{/localjs/rollpage.js}" src="../static/localjs/rollpage.js"></script>
    <script th:src="@{/js/jquery.min.js}" src="../static/js/jquery.min.js"></script>
    <script th:src="@{/localjs/plaresult.js}" src="../static/localjs/plaresult.js"></script>

</head>
<body>
<div layout:fragment="content">
    <div class="row">

        <div class="col-lg-12">
            <div class="x_panel">
                <div class="x_title">
                    <h2>
                        执行计划<i class="fa fa-bicycle"></i>
                    </h2>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>

        <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="x_panel">
                <div class="x_title">
                    <h5>Basic Info</h5>
                </div>
                <div class="x_content">
                    <table  id="datatable-responsive"
                            class="table table-striped table-bordered dt-responsive nowrap dataTable no-footer dtr-inline collapsed"
                            cellspacing="0" width="100%" role="grid"
                            aria-describedby="datatable-responsive_info"
                            style="width: 100%;">
                        <thead>
                        <th>#</th>
                        <th>content</th>
                        <th>#</th>
                        <th>content</th>
                        </thead>
                        <tbody>
                        <tr>
                            <th>编号</th>
                            <td th:text="${chance.getChcId()}"></td>
                            <th>机会来源</th>
                            <td th:text="${chance.getChcSource()}"></td>
                        </tr>
                        <tr>
                            <th>客户名称</th>
                            <td th:text="${chance.getChcCustName()}"></td>
                            <th>成功几率(%)</th>
                            <td th:text="${chance.getChcRate()}"></td>
                        </tr>
                        <tr>
                            <th>负责人</th>
                            <td th:text="${chance.getChcDueTo()}"></td>
                            <th>联系电话</th>
                            <td th:text="${chance.getChcTel()}"></td>
                        </tr>
                        <tr>
                            <th>概要</th>
                            <td th:text="${chance.getChcTitle()}"></td>
                        </tr>
                        <tr>
                            <th>机会描述</th>
                            <td th:text="${chance.getChcDesc()}"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="x_panel">
                <div class="x_content">
                    <table class="table">
                        <thead>
                        <th>日期</th>
                        <th>计划项</th>
                        <th>计划结果</th>
                        <th>操作</th>
                        </thead>
                        <tbody>
                        <tr th:each="plan : ${plans}">
                            <td th:text="${plan.getPlaDate()}"></td>
                            <td th:text="${plan.getPlaTodo()}"></td>
                            <td>
                                <input class="form-control"
                                       id="plaResult" name="plaResult" required="required"
                                       th:value="${plan.plaResult}"
                                       data-validate-length-range="20" data-validate-words="1"
                                       type="text">
                            </td>
                            <td>
                                <div class="btn-group">
                                    <button type="button" class="btn btn-danger">点击操作</button>
                                    <button type="button"
                                            class="btn btn-danger dropdown-toggle"
                                            data-toggle="dropdown" aria-expanded="false">
                                        <span class="caret"></span>
                                        <span class="sr-only">Toggle Dropdown</span>
                                    </button>
                                    <ul class="dropdown-menu" role="menu">
                                        <li>
                                            <a class="editResult" href="javascript:;"
                                               th:onclick="'javascript:modifying('+this+','+${plan.plaId}+');'"
                                               data-toggle="tooltip"
                                               data-placement="top" title=""
                                               data-original-title="保存">保存</a>
                                        </li>

                                    </ul>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>




        <div class="col-md-12 col-sm-12 col-xs-12" >
            <div class="x_panel">
                <div class="col-md-10 col-md-offset-5">
                    <button type="button" class="btn btn-info">帮助</button>
                    <button type="button" class="btn btn-warning" href="javascript:;"
                            th:onclick="'javascript:editStatus(\'fail\','+${chance.chcId}+');'">终止开发
                    </button>

                    <button type="button" class="btn btn-primary" href="javascript:;"
                            th:onclick="'javascript:formulate('+${chance.chcId}+');'">制定计划</button>
                    <button type="button" class="btn btn-success" href="javascript:;"
                            th:onclick="'javascript:editStatus(\'succeed\','+${chance.chcId}+');'">开发成功
                    </button>
                    <button type="button" class="btn btn-primary" id="back"
                            onclick="javascript:window.history.back();">返回
                    </button>
                    <br/><br/>
                </div>
            </div>
        </div>

    </div>
</div>
</body>
</html>